﻿@model ScrumPilot.Domain.Models.Sprint
@using (Ajax.BeginForm("UpdateSprintDef", "Sprint", null, new AjaxOptions { OnComplete = "return myPage.EditDialogComplete();" }, new { @id = "SprintForm" }))
{
    @Html.ValidationSummary(true)
    @Html.HiddenFor(model => model.ID)

    <div class="editor-label">
        @Html.LabelFor(model => model.Name)
    </div>
    <div class="editor-field">
        @Html.TextBoxFor(model => model.Name)
        @Html.ValidationMessageFor(model => model.Name)
    </div>
    <div class="editor-label">
        @Html.LabelFor(model => model.Description)
    </div>
    <div class="editor-field">
        @Html.TextAreaFor(model => model.Description, 4)
        @Html.ValidationMessageFor(model => model.Description)
    </div>

    <div class="editor-label">
        @Html.LabelFor(model => model.Retrospective)
    </div>
    <div class="editor-field">
        @Html.TextAreaFor(model => model.Retrospective, 4)
        @Html.ValidationMessageFor(model => model.Retrospective)
    </div>
    <div class="editor-label">
        @Html.LabelFor(model => model.State)
    </div>
    <div class="editor-field">
        @Html.DropDownListFor(model => model.State, new SelectList(Model.StateList, "key", "value", (int)Model.State))
    </div>

    <div class="editor-label">
        @Html.LabelFor(model => model.StartDate)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.StartDate)
    </div>

    <div class="editor-label">
        @Html.LabelFor(model => model.EndDate)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.EndDate)
    </div>
}
